package com.glsc.ngateway.common.base.repo.mysql.opmanage.report.subscribe;

import com.glsc.ngateway.common.base.domain.mysql.opmanage.report.subscribe.ReportParamConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: qiyr
 * @date: 2022/6/2 10:47
 * @description: 报表可配置参数数据访问层
 */
@Repository
public interface ReportParamConfigRepo extends JpaRepository<ReportParamConfig, Long>, JpaSpecificationExecutor<ReportParamConfig> {

    @Query(value = "SELECT * FROM glsc_data.t_report_param_config WHERE report_id=:reportId", nativeQuery = true)
    List<ReportParamConfig> getByReportId(@Param("reportId") String reportId);
}
